package com.zcq.thumbup.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zcq.thumbup.model.dto.DoThumbRequest;
import com.zcq.thumbup.model.entity.Thumb;
import jakarta.servlet.http.HttpServletRequest;

/**
 * @author JX
 * @description 针对表【thumb】的数据库操作Service
 * @createDate 2025-04-25 17:03:00
 */
public interface ThumbService extends IService<Thumb> {

    /**
     * 点赞
     *
     * @param doThumbRequest
     * @param request
     * @return {@link Boolean }
     */
    Boolean doThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 取消点赞
     * @param doThumbRequest
     * @param request
     * @return {@link Boolean }
     */
    Boolean undoThumb(DoThumbRequest doThumbRequest, HttpServletRequest request);

    /**
     * 判断用户是否点赞
     *
     * @param blogId
     * @param userId
     * @return
     */
    Boolean hasThumb(Long blogId, Long userId);

}
